@import '@tencent/micro-frontend-shared/style/color.scss';
@import '../common/common.scss';


.file-detail {
    height: calc(100vh - 48px);

    .header {
        display: flex;
        padding: 16px 16px 16px 30px;
        border-bottom: 1px solid $grey-2;

        .backIcon {
            width: 28px;
            height: 28px;
            color: $blue-5;
            margin-right: 20px;
            text-align: center;
            background: #fff;
            border-radius: 50%;
            box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
            cursor: pointer;
            transition: all 0.3s;

            svg {
                font-size: 18px;
                vertical-align: middle !important;
            }

            &:hover {
                box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
            }
        }

        .file-info {
            flex: 1;

            .file-name {
                font-size: 18px;
                font-weight: 500;
            }
        }
    }

    .content-wrapper {
        display: flex;
        height: 100%;

        .issue-list {
            flex: 0 1 300px;
            border-right: 1px solid $grey-2;

            .issue-item {
                padding: 0 16px;
                transition: all 0.3s;
                cursor: pointer;

                & > div {
                    padding: 16px 0;
                    border-bottom: 1px solid $grey-2;
                }

                &:hover {
                    background-color: $grey-1;
                }

                .func-name {
                    display: flex;
                    justify-content: space-between;
                    font-weight: 500;

                    .name {
                        max-width: 211px;
                        overflow: auto;
                        text-overflow: ellipsis;
                    }
                }
            }
        }
        .code-wrapper {
            flex: 1;
            height: 100%;
        }
    }

    .desc {
        color: $grey-7;
        font-size: 12px;
        margin-top: 8px;

        .link {
            color: $blue-5;
        }
    }

    .cc-desc {
        border-right: 1px solid $grey-3;
        padding-right: 10px;
        margin-right: 10px;
    }

    .red {
        color: $red-5;
    }
}

.code-line-wrapper {
    $code-line-width: 46px;
    $code-line-padding: 8px;

    display: flex;
    align-items: center;

    .code-line {
        flex: 0 1 $code-line-width;
        padding: $code-line-padding;
        height: 100%;
        text-align: right;
        font-size: 13px;

        &.is-issue {
            color: #ffffff;
            background-color: #ff676b;
        }
    }

    .code-content {
        flex: 1;
        // height: 100%;

        pre {
          padding: 0;
        }

        code {
          padding: 7px;
        }

        pre,
        code {
            height: 100%;
            overflow-x: auto;
            overflow-y: hidden;
            word-break: break-all;
            white-space: break-spaces;
            margin-bottom: 0;
        }

        .issue-info {
            padding: 8px;
            margin: -7px -7px 0px;
            color: #ffffff;
            background-color: #f5a623;

            .modifier {
                font-size: 12px;
                padding-left: 22px;
                margin-top: 4px;
            }
        }
    }
}

.status {
    padding: 2px 10px;
    font-size: 12px;
    border-radius: 2px;

    &-0 {
        color: $grey-7;
        background-color: rgba($color: $grey-7, $alpha: 0.1);
    }

    &-1 {
        color: $blue-7;
        background-color: rgba($color: $blue-7, $alpha: 0.08);
    }

    &-2 {
        color: $red-8;
        background-color: rgba($color: $red-8, $alpha: 0.07);
    }

    &-3 {
        color: $cyan-8;
        background-color: rgba($color: $cyan-8, $alpha: 0.08);
    }
}
